<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

// Route::get('/', function () {
//     return view('welcome');
    
// });

// Route::get('/test', function () {
//     // return view('welcome');
//     return 'hello my dear';
// });

// Route::get('/form',function(){
// 	return view('form');
// });

// // Route::post('/test',function(){

// // 	return '111';
// // });

// Route::put('/myput',function()
// 	{
// 		return "这是一个PUT";
// 	});


Route::get('/request/add','Admin\RequestController@add');
Route::post('/request/insert','Admin\RequestController@insert');
Route::get('/response','Admin\RequestController@response');

//中间件
Route::post('/login','Admin\RequestController@login')->middleware('login');

//视图
Route::get('/view',function(){
	return view('view',['name'=>'love']);
});

Route::get('/home',function(){

	// session(['name'=> 'yang']);
	$value = session('name');
	// var_dump($value);
	// dd($value);
});

Route::get('/blade',function(){

	return view('blade');
});

Route::get('/sblade',function(){

	return view('sblade',['status'=> 1]);
});